package com.carrot.auth.constants;

/**
 * JWT 常量
 */
public interface JwtConstants {

    /** 请求头的默认前缀 */
    String TOKEN_HEAD = "Bearer ";
    /** jwt token 的认证头部 */
    String TOKEN_HEADER = "Authorization";
    /** jwt 刷新token 的认证头部 */
    String REFRESH_TOKEN_HEADER = "R-Authorization";
    /** 服务之间的用户认证头部 */
    String USER_INFO_HEADER = "UserInfo";
    /** FORM 表单头部 */
    String FROM_HEADER = "x-from";

    String JWT_CLAIM_TAG = "tag";
    String JWT_CLAIM_KEY_ID = "uid";
    String JWT_CLAIM_KEY_USER_NAME = "username";
    String JWT_CLAIM_KEY_NICK_NAME = "nickname";
    String JWT_CLAIM_KEY_PHONE = "phone";
    String JWT_CLAIM_KEY_EMAIL = "email";
    String JWT_CLAIM_KEY_LOGIN_FROM = "loginFrom";
    String JWT_CLAIM_KEY_LOGIN_IP = "loginIp";
    String JWT_CLAIM_KEY_TENANT_ID = "tenantId";

    Integer JWT_SIGNATURE_DELAY = -5;

}
